;;;
;;;
;;;	Author:
;;;		Henry C. Francis
;;;		425 N. Ashe St.
;;;		Southern Pines, NC 28387
;;;
;;;	http://www.paracadd.com
;;;	All rights reserved.
;;;
;;;	Copyright:	7-9-1999
;;;	   Edited:	7-9-1999
;;;
(defun c:flippi ( / flip-ss)
  (while
    (and (setq sel_item (entsel "\010\010\010\010\010\010\010\010\010\010\010\010\010\010\010\010\010\010\010\010\010\010Select block to flip. "))
	 (if sel_item (or
			(and
			  (eq(cdr(assoc 0 (entget(car sel_item))))"INSERT")
			  (/=(boole 1 (cdr(assoc 70 (tblsearch "block"(cdr(assoc 2(entget(car sel_item))))))) 4) 4)
		        )
			(eq(cdr(assoc 0 (entget(car sel_item))))"TEXT")
		      )
	 )
    )
    (setq sel_edata (entget (car sel_item)))
    (setq iang (cdr(assoc 50 sel_edata)))
    (setq sel_edata (subst (cons 50 (+ PI iang))(assoc 50 sel_edata)sel_edata))
    (entmod sel_edata)
    (setq sel_item nil)
  )
  (princ "\nNo block selected! ")
  (princ)
)
(DEFUN C:FLIPALL ()
  (SETQ flip-ss (SSGET '((0 . "INSERT"))))
  (SETQ flip-cnt 0)
  (WHILE (< flip-cnt (SSLENGTH flip-ss))
    (SETQ flip-ent (entget(ssname flip-ss flip-cnt)))
    (IF (OR
          (AND
            (eq(cdr(assoc 0 flip-ent))"INSERT")
            (/=(boole 1 (cdr(assoc 70 (tblsearch "block"(cdr(assoc 2 flip-ent))))) 4) 4)
	  )
          (eq(cdr(assoc 0 flip-ent))"TEXT")
        )
      (PROGN
        (SETQ flip-ent
               (SUBST (IF (> (CDR (ASSOC 50 flip-ent)) PI)
                        (CONS 50 (- (CDR (ASSOC 50 flip-ent)) PI))
                        (CONS 50 (+ (CDR (ASSOC 50 flip-ent)) PI))
                      )
                      (ASSOC 50 flip-ent)
                      flip-ent
               )
        )
        (ENTMOD flip-ent)
      )
    )
    (SETQ flip-cnt (1+ flip-cnt))
  )
  (PRINC)
)